package com.example.myapplication.ui.fragment

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.myapplication.request.CoinsRequest
import kotlinx.coroutines.launch

/**
 *我的viewModel
 *
 * @author : Kun
 * @date : 2021/6/10
 * @time : 17:16
 */
class MineViewModel : ViewModel() {
    /**
     *积分相关的请求
     */
    val coinsRequest = CoinsRequest()

    /**
     * 获取用户积分
     */
    fun requestUserCoinsResult() {
        viewModelScope.launch {
            coinsRequest.requestUserCoinsResult()
        }
    }
}